package com.code.softeem.lianxi.lianxi1;

/**
 * @author xiyu
 * @version 1.0
 * @date 2025/3/20 11:24
 * @description
 */
public class Coder {
    private String name;
    private String id;
    private double gongzi;

    public Coder() {
    }

    public Coder(String name, String id, double gongzi) {
        this.name = name;
        this.id = id;
        this.gongzi = gongzi;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public double getGongzi() {
        return gongzi;
    }

    public void setGongzi(double gongzi) {
        this.gongzi = gongzi;
    }

    public void work(){
        System.out.println("姓名："+name+
                "，工号："+id+
                "，工资："+gongzi);
    }

    @Override
    public String toString() {
        return "Coder{" +
                "name='" + name + '\'' +
                ", id='" + id + '\'' +
                ", gongzi=" + gongzi +
                '}';
    }
}
